import request from '@/utils/request'

// 编辑
export function createOrUpdateInfo(form) {
  return request.post('/news/createOrUpdate', form)
}

// 获取
export function queryList(listquery) {
  return request.post('/news/query', listquery)
}

export function changeStatus(id, status) {
  return request.post('/news/changeStatus', { id, status })
}

export function getNewsById(id) {
  return request.post('/news/get', { id })
}


export function queryFeedback(listquery) {
  return request.post('/news/queryFeedback', listquery)
}

export function queryFeedbackReply(listquery) {
  return request.post('/news/queryFeedbackDetail', listquery)
}
export function addFeedbackDetail(form) {
  return request.post('/news/addFeedbackDetail', form)
}


export function getStatus() {
  return {
    'create': '创建',
    'publish': '发布',
    'offline': '下架'
  }
}

export function getClassType() {
  return {
    'user': '用户手册',
    'private': '隐私协议',
    'notice': '公告'
  }
}